package com.ln.第三遍1105.demo03;

import java.util.Arrays;

/**
 * @author Ln
 * @version 终极版
 * @date 2022/11/6 16:36
 */
public class Test01 {
    public static void main(String[] args) {
        Integer []arr={4,5,6,7,8,9};
        Integer reduce = Arrays.stream(arr).reduce(0, Integer::sum);
        System.out.println(reduce);

        Integer reduce1 = Arrays.stream(arr).reduce(0, Integer::max);
        System.out.println(reduce1);

        Integer reduce2 = Arrays.stream(arr).reduce(0, Integer::min);
        System.out.println(reduce2);
    }
}
